package com.design01_builder.pattern04_builder.example01.director;

import com.design01_builder.pattern04_builder.example01.builder.Builder;
import com.design01_builder.pattern04_builder.example01.product.Bike;

/**
 * @ClassName Director
 * @Description 指挥者
 * @Author zhangjunhao
 * @DATE 2023/9/3 1:41
 */
public class Director {

    private Builder mBuilder;

    public Director(Builder mBuilder) {
        this.mBuilder = mBuilder;
    }


    /**
     * @Author zhangjunhao
     * @Description 自行车制作
     * @Date  2023/9/3
     * @Param
     * @return
     **/
    public Bike construct(){
        mBuilder.buildFrame();
        mBuilder.buildSeat();
        return mBuilder.createBike();
    }

}
